Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pivot editing to UV editor #83612

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aXu-AP
Copy link
Contributor

@aXu-AP aXu-AP commented Oct 19, 2023

Implements partially godotengine/godot-proposals#4118

Shows draggable pivot point in UV editor when Points mode is selected. Priority is given to dragging vertices to avoid accidentally moving pivot.

Bonus: Fix UV editor using hardcoded value instead of editor setting polygon_editor/point_grab_radius.

pivot

Add draggable pivot marker to UV editors Points mode.
Bonus: Fix UV editor using hardcoded value instead of editor setting polygon_editor/point_grab_radius.
@@ -1239,6 +1264,11 @@ void Polygon2DEditor::_uv_draw() {
}
}

if (uv_edit_mode[1]->is_pressed()) {
Copy link
Member

@KoBeWi KoBeWi Oct 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated, but the modes should get an enum.

EDIT:
I see there are some enums already, but for something different. uv_edit_mode values are still hard-coded, which is bad.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this code is a bit all over the place and there's some confusing terminology for modes, actions and menu items. I've outlined some refactoring work which I want to do in godotengine/godot-proposals#8209 (input on those points would be appreciated).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants